package cn.edu.seig.himusic;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

import java.util.Arrays;
import java.util.List;

@EnableCaching   // 开启Spring Boot基于注解的缓存管理支持
@SpringBootApplication
public class VibeMusicServerApplication {

  public static void main(String[] args) {
    Env.show();
    SpringApplication.run(VibeMusicServerApplication.class, args);
  }

  static class Env {
    static void show() {
      System.out.println("=== .env 环境变量列表 ===");
      List<String> envVars = Arrays.asList(
          "MYSQL_HOST",
          "MYSQL_USER",
          "MYSQL_PASSWORD",
          "MINIO_HOST",
          "MINIO_ACCESS_KEY",
          "MINIO_SECRET_KEY"
      );
      for (String var : envVars) {
        String value = System.getenv(var);
        System.out.println("- " + var + ": " + (value != null ? value : "未设置"));
      }
    }
  }
}
